package com.zeng.stpro.commons.exception;

/**
 * @Author ZENGZHIJUN
 * @Date 2021/2/2 15:48
 *
 * 自定义业务异常
 */
public class StrawberryException extends RuntimeException {

    private String msg;
    private int code = 500;

    public StrawberryException() {

    }

    public StrawberryException(String msg) {
        this.msg = msg;
    }

    public StrawberryException(String msg, Throwable e) {
        super(msg,e);
        this.msg = msg;
    }

    public StrawberryException(String msg,int code) {
        this.msg = msg;
        this.code = code;
    }

    public StrawberryException(String msg, int code, Throwable e) {
        super(msg,e);
        this.msg = msg;
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

}
